<template>
	<view class="page">
		
		<z-paging ref="paging" v-model="list" @query="queryList" :default-page-size="10">
			<view slot="top">
				<view class="nav_bar nav"
					:style="`background: url(${$util.prefix('auth/store_auth_nav_bg.png')}) 0 0 no-repeat;`">
					<uni-nav-bar color="#333" left-icon="left" title="运营活动" :border='false' :fixed="true"
						background-color="transparent" @clickLeft="$native.backAction()" right-text="管理"
						@clickRight="onClickRight">
				
					</uni-nav-bar>
				</view>
				
				<view class="nav_box"></view>
				
				<view class="header">
					<view class="tab flex_r_between">
				
						<view class="item flex_r_around" @click="tab = 1" :id="tab == 1 ? 'select' : ''">
							<view class="flex_center">
								<image :src="$util.prefix('circle/circle_activity_tab1.png')" mode="aspectFill"></image>
								<text>商品折扣</text>
							</view>
						</view>
				
						<view class="item flex_r_around" @click="tab = 2" :id="tab == 2 ? 'select' : ''">
							<view class="flex_center">
								<image :src="$util.prefix('circle/circle_activity_tab2.png')" mode="aspectFill"></image>
								<text>服务打赏</text>
							</view>
						</view>
				
					</view>
				
					<view class="search flex_center">
						<view class="icon">
							<u-icon name="search" size="32rpx" color="#888"></u-icon>
						</view>
						<input type="text" placeholder="请输入" v-model="key" placeholder-class="input-placeholder" />
					</view>
				
				</view>
			</view>
			<view class="container">
				<view class="list flex_r_between" v-for="(item,index) in 10" :key="index">
					<view class="image">
						<image src="/static/public/alipay.png" mode="aspectFill"></image>
					</view>
					
					<view class="content">
						<view class="name hidden">商品名称商品名称商品名称</view>
						<view class="store-tags flex_center">
							<view class="item flex_center">
								<text>店铺名称店铺</text>
							</view>
							<view class="item flex_center">
								<image src="/static/expert/tags.png" mode="aspectFill"></image>
								<text>商家昵称</text>
							</view>
						</view>
						<view class="text-tags">
							<text>折扣权限：所有人、VIP、SVIP、满消费额度</text>
						</view>
					</view>
				</view>
			</view>
			
			<view slot="bottom">
				<view class="footer flex_r_between">
					<view class="left flex_center">
						<image src="/static/public/select.png" mode="aspectFill"></image>
						<text>全选</text>
					</view>
					<view class="right">
						<text>设置</text>
					</view>
				</view>
			</view>
		</z-paging>
		
		<u-popup :safeAreaInsetBottom="false" mode="center" :show="set_open_show" @close="set_open_show = false"
			bgColor="transparent">
			<view class="set-open flex_c">
				<view class="set-header">
					<text>管理</text>
				</view>
				
				<view class="set-content">
					
				</view>
				
			</view>
		</u-popup>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				tab: 1,

				key: '',
				
				list: [],
				
				set_open_show: false,
			}
		},
		methods: {
			onClickRight() {
				this.set_open_show = true;
			},
		}
	}
</script>

<style lang="less" scoped>
	.nav_bar {
		/deep/ .uni-nav-bar-right-text {
			font-weight: 500;
			font-size: 30rpx;
			color: #FD2A53 !important;
		}

		/deep/ .uni-nav-bar-text {
			font-weight: 600;
			font-size: 32rpx;
		}
	}

	.header {
		background: #FFF;
		padding: 16rpx 32rpx;

		.tab {
			.item {
				width: 332rpx;
				height: 80rpx;
				background: #FFFFFF;
				box-shadow: 0rpx 0rpx 16rpx 0rpx #D9E4E9;
				border-radius: 16rpx;
				border: 2rpx solid #FFFFFF;

				image {
					width: 48rpx;
					height: 48rpx;
					margin-right: 8rpx;
				}

				text {
					font-size: 28rpx;
					color: #131313;
				}
			}

			#select {
				background: #FFEAEE;
				border: 2rpx solid rgba(253, 42, 83, 0.3);
			}
		}

		.search {
			margin-top: 16rpx;
			padding: 0 32rpx;
			width: 686rpx;
			height: 64rpx;
			background: #F1F1F1;
			border-radius: 12rpx;
			
			input {
				margin-left: 24rpx;
				flex: 1;
				font-size: 28rpx;
				color: #131313;
			}
		}

	}

	.footer {
		width: 100vw;
		height: 110rpx;
		padding: 0 32rpx 30rpx;
		background: #FFFFFF;
		box-shadow: 0rpx -2rpx 16rpx 0rpx rgba(0,0,0,0.05), 0rpx -2rpx 16rpx 0rpx rgba(0,0,0,0.05);
		
		.left {
			image {
				width: 40rpx;
				height: 40rpx;
				margin-right: 16rpx;
			}
			
			text {
				font-weight: 500;
				font-size: 32rpx;
				color: #131313;
			}
		}
		
		.right {
			font-weight: 500;
			font-size: 32rpx;
			color: #FD2A53;
		}
	}

	.container {
		overflow: hidden;
		.list {
			background: #FFFFFF;
			border-radius: 24rpx;
			padding: 24rpx 32rpx 32rpx 24rpx;
			overflow: hidden;
			
			.image {
				width: 184rpx;
				height: 184rpx;
				margin-right: 24rpx;
				image {
					width: 184rpx;
					height: 184rpx;
				}
			}
			
			.content {
				flex: 1;
				overflow: hidden;
				
				.name {
					font-weight: 500;
					font-size: 32rpx;
					color: #333333;
				}
				
				.store-tags {
					margin: 8rpx 0 12rpx;
					.item {
						background: #FFFBF0;
						border-radius: 8rpx;
						padding: 8rpx 16rpx;
						margin-right: 12rpx;
						
						text {
							font-size: 24rpx;
							color: #A46C33;
						}
						
						image {
							width: 28rpx;
							height: 28rpx;
							border-radius: 50%;
							margin-right: 8rpx;
						}
						
					}
				}
				
			}
		}
	}

	.set-open {
		width: 630rpx;
		height: 528rpx;
		background: #FFFFFF;
		border-radius: 40rpx;
		overflow: hidden;
		.set-header {
			width: 630rpx;
			height: 184rpx;
			background: linear-gradient( 270deg, rgba(191, 234, 255, 0.6) 0%, #FEFBFF 54%, rgba(241, 216, 250, 0.6) 100%);
			padding: 40rpx 0 0 40rpx;
			text {
				font-weight: 500;
				font-size: 36rpx;
				color: #131313;
				line-height: 50rpx;
			}
		}
		
		.set-content {
			
		}
	}

</style>